<?php

namespace App\Http\Requests\Admin;

use App\Http\Requests\ApiRequest;
use Illuminate\Validation\Rule;

/**
 * @property string account
 * @property string type
 */
class ForgotPasswordRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'type'        => ['required', 'string', Rule::in(['panx', 'customer', 'store'])],
            'account'     => 'required|string|max:'.self::MAX_STRING,
        ];
    }

    /**
     * @return array
     */
//    public function messages()
//    {
//        return [
//            'account.*'     => '登录名称必须是字符串',
//            'type.*'        => '登录的后台类型必须填写',
//        ];
//    }
}
